<template>
	<view class="themeItem">
		<navigator :url="`/pages/goods/detail?id=${item.id}`" class="box" v-if="!isMore">
			<image class="pic" :src="item.图片组[0]" mode="aspectFill"></image>
			<!-- <view class="tab">{{filterDataSource(dataSource?.类别,item.类别)}}</view> -->
			<view class="tab">{{item.名称}}</view>
			<view class="a-mask  q-pa-xs row justify-between">
				<!-- {{item.名称}} -->
				<view class="row">
					￥{{item.价格}}
				</view>
				<view class="row flex-center">
					<uni-icons type="cart" class="text-white" size="18"></uni-icons>
					<text>999</text>
				</view>
			</view>
		</navigator>

		<navigator url=" /pages/classify/classify" open-type="reLaunch" class="box more" v-if="isMore">
			<image class="pic" src="@/static/logo.png" mode="aspectFill"></image>
			<view class="a-mask mask q-pa-xs">
				<view class="text">更多……</view>
			</view>
		</navigator>
	</view>
</template>

<script setup>
	import * as util from "@/amtf/utils"
	import {
		filterDataSource,
	} from '@/utils/format'
	defineProps({
		isMore: {
			type: Boolean,
			default: false
		},
		item: {
			type: Object,
			default () {
				return {
					name: "默认名称",
					imageUrl: "../../common/images/classify1.jpg",
					updateTime: Date.now() - 1000 * 60 * 60 * 5
				}
			}
		},
		// dataSource: {
		// 	type: Object,
		// }
	})
</script>

<style lang="scss" scoped>
	.themeItem {
		.box {
			height: 340rpx;
			border-radius: 10rpx;
			overflow: hidden;
			position: relative;

			.pic {
				width: 100%;
				height: 100%;
			}

			.tab {
				position: absolute;
				left: 0;
				top: 0;
				background: rgba(250, 129, 90, 0.7);
				backdrop-filter: blur(20rpx);
				color: #fff;
				padding: 6rpx 14rpx;
				border-radius: 0 0 20rpx 0;
				transform: scale(0.8);
				transform-origin: left top;
			}
		}

		.box.more {
			.mask {
				width: 100%;
				height: 100%;
				flex-direction: column;
			}

			.text {
				font-size: 28rpx;
			}
		}
	}
</style>